// 这里是手风琴轮播图的JS
/* var data = [
    {
        img: "assets/images/001.jpg",
        msg: "远离家乡",

    },
    {
        img: "assets/images/002.jpg",
        msg: "不胜唏嘘",

    },
    {
        img: "assets/images/006.jpg",
        msg: "繁华成秋叶",

    },
    {
        img: "assets/images/004.jpg",
        msg: "而我却像落叶归根坠在你心间",

    },
    {
        img: "assets/images/005.jpg",
        msg: "几分忧郁 几分孤单 都心甘情愿",

    },
    {
        img: "assets/images/003.jpg",
        msg: "我的爱像落叶归根 家 唯独在你身边",

    },
]
var box = document.getElementsByClassName('box')[0]
function assData(data) {
    box.innerHTML = ""
    for (var i = 0; i < data.length; i++) {
        box.innerHTML += '<div class="box1"><img style="width:100%;height:100%;" src="' + data[i]["img"] + '"alt=""><div class="text"></div><div class="msg">' + data[i]["msg"] + '</div><ul><li></li></ul></div>'
    }
}
assData(data)
//
var box1 = document.getElementsByClassName("box1")
for (var i = 0; i < box1.length; i++) {
    box1[i].onmouseenter = function () {
        if (this.style.width == '200px') {
            for (var j = 0; j < box1.length; j++) {
                box1[j].style.width = '200px'
            }
            // this.style.width = '500px'
            this.style.width = '590px'
            //点开时默认打开
            this.children[2].style.display = 'block'
            this.children[3].style.display = 'block'
        } else {
            // console.log(this.children[3]);
            this.style.width = '200px'
            this.children[2].style.display = 'none'
            this.children[3].style.display = 'none'
        }
    }
} */

// 这里是卡片轮播图的JS
var mySwiper = new Swiper('.swiper', {
    // direction: 'vertical', // 垂直切换选项
    loop: true, // 循环模式选项
    effect: 'coverflow',
    slidesPerView: 3,
    // centeredSlides: true,
    coverflowEffect: {
        rotate: 30,
        stretch: 10,
        depth: 60,
        modifier: 2,
        slideShadows: true
    },
    // 如果需要分页器
    pagination: {
        el: '.swiper-pagination',
    },

    // 如果需要前进后退按钮
    /* navigation: {
        nextEl: '.swiper-button-next',
        prevEl: '.swiper-button-prev',
    }, */

    // 如果需要滚动条
    scrollbar: {
        el: '.swiper-scrollbar',
    },

})